import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/',
      name: 'home',
      component: () => import('../views/Home.vue'),
      redirect: 'company',
      children: [
        {
          path: '/company',
          name: 'company',
          component: () => import('../views/Company.vue'),
        },
        {
          path: '/product',
          name: 'product',
          component: () => import('../views/Product.vue'),
        },
        {
          path: '/category',
          name: 'category',
          component: () => import('../views/Category.vue'),
        },
        {
          path: '/feature',
          name: 'feature',
          component: () => import('../views/Feature.vue'),
        },
        {
          path: '/data',
          name: 'data',
          component: () => import('../views/Data.vue'),
        }      

      ]
    },

  ],
})

export default router
